package org.jeemp.neety.io.bio;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author JackRen
 * @date 2021-11-12 16:24
 * @description:
 */
public class BIOClient {

    public static void main(String[] args) throws IOException {
        //进行通信，连接通信地址和端口
        Socket client = new Socket("localhost",8080);

        //输出 write（）
        OutputStream os= client.getOutputStream();

        //生成发送的内容
        String msg = "HI,Jack";

        os.write(msg.getBytes());
        os.close();
        client.close();
    }

}
